package States 
{
	import nl.jorisdormans.phantom2D.ai.statemachines.State;
	import nl.jorisdormans.phantom2D.ai.statemachines.StateMachine;
	import Powerups.FastPowerup;
	import Powerups.SlowPowerup;
	import Powerups.GravityHigh;
	import Powerups.GravityLow;
	
	/**
	 * @author Sebastiaan
	 */
	public class IdleState extends State
	{
		
		public function IdleState() 
		{
			
		}
		
		override public function handleMessage(message:String, data:Object = null):int 
		{
			switch(message)
			{
				case FastPowerup.P_FAST:
							trace("Fast");
							this.stateMachine.addState(new FastState());
							break;
							
				case SlowPowerup.P_SLOW:
							this.stateMachine.addState(new SlowState());
							trace("Slow");
							break;
							
				case GravityHigh.P_GRAVH:
							this.stateMachine.addState(new HighGrav());	
							trace("HighGrav");
							break;
							
				case GravityLow.P_GRAVL:
							this.stateMachine.addState(new LowGrav());
							trace("lowGrav");
							break;
			}
			return super.handleMessage(message, data);
		}
	}

}